import request from '@/utils/request'

export function getExemInfo(
  page: number,
  pageSize: number,
  studentId: string,
  stuName: string,
  className: string,
  exemState: string,
  exemScore: number
) {
  return request({
    url:
      '/exem/getExemInfo?page=' +
      page +
      '&pageSize=' +
      pageSize +
      '&studentId=' +
      studentId +
      '&stuName=' +
      stuName +
      '&className=' +
      className +
      '&exemState=' +
      exemState +
      '&exemScore=' +
      exemScore,
    method: 'get'
  })
}

export function updateExemState(data: object) {
  return request({
    url: '/exem/updateExemState',
    method: 'put',
    data: data
  })
}

export function setExemScore(data: object) {
  return request({
    url: '/exem/setExemScore',
    method: 'post',
    data: data
  })
}

export function passByIds(ids: number[]) {
  return request({
    url: '/exem/passByExemIds/' + ids,
    method: 'put'
  })
}

export function noPassByIds(ids: number[]) {
  return request({
    url: '/exem/noPassByExemIds/' + ids,
    method: 'put'
  })
}
export function ExportExemInfo(exemState: string, className: string) {
  return request({
    url: '/admin/export/exemIntvTable?exemState=' + exemState + '&className=' + className,
    method: 'get',
    responseType: 'blob'
  })
}
